<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
String path = request.getContextPath(); 
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html>
<head>
<base href="<%=basePath%>"> 
<meta charset="UTF-8">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">  
<title>Insert title here</title>
<link rel="stylesheet" type="text/css" href="css/maintable.css" > 
<script type="text/javascript"  src="js/jquery-1.8.0.js"></script>
<script type="text/javascript">
	$(function(){
		$("table tr").mouseover(function(){
			$(this).css("background","#D3EAEF");
			$(this).siblings().css("background","white");
		});
		})
</script>
</head>
<body>
<div class ="div_title">
	<div class="div_titlename"> <img src="images/san_jiao.gif" ><span>商品维护&ensp;分类管理</span></div>
	<div class="div_titleoper"></div>
</div>
<table class="main_table" >
	<tr>
		<th colspan="2">一级分类</th> 	<th colspan="2">二级分类</th>	
	</tr>
	<c:forEach var="one" items="${cateList }" varStatus="st">
	<tr>
		<td>
			${one.cateName }
		</td>
		<td>
			<a href="CateServlet.do?flag=bigcateEdit&id=${one.id}">修改</a> | 
			<a href="CateServlet.do?flag=bigcateDelet&amp;id=${one.id}" onclick="return confirm('确定要删除该一级分类吗？');">删除</a> 		
		</td>
		<td>
		<c:forEach var="two" items="${one.cateinfos }" varStatus="st">
			<div>${two.cateName }</div>
		</c:forEach>
		</td>
		<td>
			<c:forEach var="two" items="${one.cateinfos }" varStatus="st">
			<div>
				<a href="CateServlet.do?flag=smallcateEdit&id=${two.id}">修改</a> | 
				<a href="CateServlet.do?flag=smallcateDelet&amp;id=${two.id}" onclick="return confirm('确定要删除该二级分类吗？');" >删除</a> 	
			</div>
			</c:forEach>
		</td>
	</tr>
	</c:forEach>
</table>
<script >
var msg="${msg}";
if(msg!=""){
	alert(msg);
}
</script>
</body>
</html>